package edu.scut.course_management.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import edu.scut.course_management.po.Teacher;

/**
 * 数据访问，对应库表：teacher
 * @author sherry
 */
@Repository
public interface TeacherMapper {
    // 通过工号查找教师信息
    Teacher findByTeacherId(@Param("teacherId")String teacherId); 
    // 添加教师信息(单条)
    void addTeacher(Teacher teacher) throws DataAccessException;
    // 条件查询人员信息(动态条件查询)
    List<Teacher> conditionalQuery(Map<String, Object> conditions);
    // 更新教师信息
    int updateTeacher(Teacher teacher) throws DataAccessException;
    // 删除教师信息(单条)
    void deleteTeacher(@Param("teacherId") String teacherId) throws DataAccessException;
}
